//package org.heng.mq.consumer;
//
//import cn.hutool.core.bean.BeanUtil;
//import lombok.RequiredArgsConstructor;
//import org.apache.rocketmq.client.consumer.MessageQueueListener;
//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
//import org.apache.rocketmq.spring.core.RocketMQListener;
//import org.heng.dto.req.CancelSeatReqDTO;
//import org.heng.mq.entity.CancelSeatEvent;
//import org.heng.service.SeatService;
//
//@RocketMQMessageListener(topic = "CANCEL_SEAT_TOPIC", consumerGroup = "cancel_seat_group")
//@RequiredArgsConstructor
//public class CancelSeatConsumer implements RocketMQListener<CancelSeatEvent> {
//    private final SeatService seatService;
//    @Override
//    public void onMessage(CancelSeatEvent cancelSeatEvent) {
//        CancelSeatReqDTO cancelSeatReqDTO = BeanUtil.toBean(cancelSeatEvent, CancelSeatReqDTO.class);
//
//        seatService.cancelSeat(cancelSeatReqDTO);
//    }
//}
